package main

import (
	"context"
	"fmt"
	"time"

	"gitlab.ctyun.cn/ctg-dcos/workflow-sdk-go/pkg/client"
	"gitlab.ctyun.cn/ctg-dcos/workflow-sdk-go/pkg/openapi"
)

func main() {
	cli := openapi.NewCloudFlowClient("fc-global.ctapi.ctyun.cn",
		"Your-AK", "Your-SK",
		client.WithTimeout(60*time.Second),
		client.TlsInsecureSkipVerify())

	resp, err := cli.QueryWorkflow(context.Background(), "200000002368", openapi.WorkflowQueryRequest{
		PageNum:     1,
		PageSize:    10,
		QueryPrefix: "demo",
	})

	if err != nil {
		fmt.Printf("resp err:%v", err)
	} else {
		fmt.Printf("resp:%+v", resp)
	}
}
